package com.dycong.common.common.email;

import lombok.Getter;

/**
 * Created by yu on 15-8-10.
 */
public class EmailConfig {

    @Getter
    static String smtpServer;

    @Getter
    static String username;

    @Getter
    static String password;

    @Getter
    static String from;

    @Getter
    static String encoding = "utf-8";

    /**
     * 使用 socks 5 进行代理
     */
    @Getter
    static String proxyHost;

    /**
     * 使用 socks 5 进行代理
     */
    @Getter
    static String proxyPort;

    public void setProxyPort(String proxyPort) {
        EmailConfig.proxyPort = proxyPort;
    }

    public void setProxyHost(String proxyHost) {
        EmailConfig.proxyHost = proxyHost;
    }


    public void setSmtpServer(String smtpServer) {
        EmailConfig.smtpServer = smtpServer;
    }

    public void setUsername(String username) {
        EmailConfig.username = username;
    }

    public void setPassword(String password) {
        EmailConfig.password = password;
    }

    public void setFrom(String from) {
        EmailConfig.from = from;
    }

    public void setEncoding(String encoding) {
        EmailConfig.encoding = encoding;
    }



    /*spring配置!!!!!!
     <bean class="com.ifunpay.util.email.EmailConfig" lazy-init="false">
        <property name="smtpServer" value="${email.smtpServer:smtp.exmail.qq.com}"/>
        <property name="username" value="${email.username:service@ifunpay.com}"/>
        <property name="password" value="${email.password:mailpwd05}"/>
        <property name="from" value="${email.from:service@ifunpay.com}"/>
        <property name="proxyHost" value="${email.proxyHost:}"/>
        <property name="proxyPort" value="${email.proxyPort:}"/>
    </bean>
     */
}